Track direct window cairo access and avoid tricks when used
authorAlexander Larsson <alexl@redhat.com>
Tue, 19 Jan 2010 13:44:52 +0000 (14:44 +0100)
committerAlexander Larsson <alexl@redhat.com>
Tue, 19 Jan 2010 14:01:03 +0000 (15:01 +0100)
commit841fa4771505b6810da341ea379d5f56af7ef1d1
tree6cf15775247674c5c13ec240ac341e9a78dbd66c
parent269b0fe97f70d5b1b4bba29686f929baf6bef91c
Track direct window cairo access and avoid tricks when used

When a cairo surface is requested for direct window access (i.e. not
when double-buffering) we can't really track when the actual drawing happens
as cairo drawing is not virtualized. This means we can't properly flush
any outstanding window moves or implicit paints.

This actually causes problems with e.g. abiword (bug #606009) where they
draw without double-buffering. If you press down it scrolls the window
and then draws the caret, but the caret drawing does not flush the
outstanding move from the scroll, so the caret gets drawn on the wrong
screen.

We fix this by never allowing either implicit paints or outstanding window
moves on impl-windows where any windows related to it has an outstanding
direct cairo surface. Luckily this is not very common so in practice this
doesn't matter much.
gdk/gdkinternals.h
gdk/gdkwindow.c